package com.atguigu.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.atguigu.bean.User;
import com.atguigu.dao.UserDao;

@Service
public class UserService {
	@Autowired
	private UserDao userDao;
	
	public User getUserByAccountAndPassword(String account,String password){
		return userDao.getUserByAccountAndPassword(account, password);
	}
	public User getUserById(Integer id){
		return userDao.getUserById(id);
	}
	public List<User> getUsers(){
		return userDao.getUsers();
	}
	public int insertUser(User user){
		return userDao.insertUser(user);
	}
}
